Integrand size = 28, antiderivative size = 92 \[ \int (a+b \cos (c+d x)) \left (a^2-b^2 \cos ^2(c+d x)\right ) \, dx=\frac {1}{2} a \left (2 a^2-b^2\right ) x+\frac {2 b \left (2 a^2-b^2\right ) \sin (c+d x)}{3 d}+\frac {a b^2 \cos (c+d x) \sin (c+d x)}{6 d}-\frac {b (a+b \cos (c+d x))^2 \sin (c+d x)}{3 d} \]
1/2*a*(2*a^2-b^2)*x+2/3*b*(2*a^2-b^2)*sin(d*x+c)/d+1/6*a*b^2*cos(d*x+c)*si n(d*x+c)/d-1/3*b*(a+b*cos(d*x+c))^2*sin(d*x+c)/d
Time = 0.29 (sec) , antiderivative size = 75, normalized size of antiderivative = 0.82 \[ \int (a+b \cos (c+d x)) \left (a^2-b^2 \cos ^2(c+d x)\right ) \, dx=-\frac {6 a b^2 c-12 a^3 d x+6 a b^2 d x+\left (-12 a^2 b+9 b^3\right ) \sin (c+d x)+3 a b^2 \sin (2 (c+d x))+b^3 \sin (3 (c+d x))}{12 d} \]
-1/12*(6*a*b^2*c - 12*a^3*d*x + 6*a*b^2*d*x + (-12*a^2*b + 9*b^3)*Sin[c + d*x] + 3*a*b^2*Sin[2*(c + d*x)] + b^3*Sin[3*(c + d*x)])/d
Time = 0.40 (sec) , antiderivative size = 95, normalized size of antiderivative = 1.03, number of steps used = 7, number of rules used = 7, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.250, Rules used = {3042, 3495, 25, 3042, 3232, 3042, 3213}
Below are the steps used by Rubi to obtain the solution. The rule number used for the transformation is given above next to the arrow. The rules definitions used are listed below.
\(\displaystyle \int (a+b \cos (c+d x)) \left (a^2-b^2 \cos ^2(c+d x)\right ) \, dx\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle \int \left (a+b \sin \left (c+d x+\frac {\pi }{2}\right )\right ) \left (a^2-b^2 \sin \left (c+d x+\frac {\pi }{2}\right )^2\right )dx\) |
\(\Big \downarrow \) 3495 |
\(\displaystyle -\int -\left ((a-b \cos (c+d x)) (a+b \cos (c+d x))^2\right )dx\) |
\(\Big \downarrow \) 25 |
\(\displaystyle \int (a-b \cos (c+d x)) (a+b \cos (c+d x))^2dx\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle \int \left (a-b \sin \left (c+d x+\frac {\pi }{2}\right )\right ) \left (a+b \sin \left (c+d x+\frac {\pi }{2}\right )\right )^2dx\) |
\(\Big \downarrow \) 3232 |
\(\displaystyle \frac {1}{3} \int (a+b \cos (c+d x)) \left (3 a^2+b \cos (c+d x) a-2 b^2\right )dx-\frac {b \sin (c+d x) (a+b \cos (c+d x))^2}{3 d}\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle \frac {1}{3} \int \left (a+b \sin \left (c+d x+\frac {\pi }{2}\right )\right ) \left (3 a^2+b \sin \left (c+d x+\frac {\pi }{2}\right ) a-2 b^2\right )dx-\frac {b \sin (c+d x) (a+b \cos (c+d x))^2}{3 d}\) |
\(\Big \downarrow \) 3213 |
\(\displaystyle \frac {1}{3} \left (\frac {2 b \left (2 a^2-b^2\right ) \sin (c+d x)}{d}+\frac {3}{2} a x \left (2 a^2-b^2\right )+\frac {a b^2 \sin (c+d x) \cos (c+d x)}{2 d}\right )-\frac {b \sin (c+d x) (a+b \cos (c+d x))^2}{3 d}\) |
-1/3*(b*(a + b*Cos[c + d*x])^2*Sin[c + d*x])/d + ((3*a*(2*a^2 - b^2)*x)/2 + (2*b*(2*a^2 - b^2)*Sin[c + d*x])/d + (a*b^2*Cos[c + d*x]*Sin[c + d*x])/( 2*d))/3
3.6.61.3.1 Defintions of rubi rules used
Int[((a_) + (b_.)*sin[(e_.) + (f_.)*(x_)])*((c_.) + (d_.)*sin[(e_.) + (f_.) *(x_)]), x_Symbol] :> Simp[(2*a*c + b*d)*(x/2), x] + (-Simp[(b*c + a*d)*(Co s[e + f*x]/f), x] - Simp[b*d*Cos[e + f*x]*(Sin[e + f*x]/(2*f)), x]) /; Free Q[{a, b, c, d, e, f}, x] && NeQ[b*c - a*d, 0]
Int[((a_) + (b_.)*sin[(e_.) + (f_.)*(x_)])^(m_)*((c_.) + (d_.)*sin[(e_.) + (f_.)*(x_)]), x_Symbol] :> Simp[(-d)*Cos[e + f*x]*((a + b*Sin[e + f*x])^m/( f*(m + 1))), x] + Simp[1/(m + 1) Int[(a + b*Sin[e + f*x])^(m - 1)*Simp[b* d*m + a*c*(m + 1) + (a*d*m + b*c*(m + 1))*Sin[e + f*x], x], x], x] /; FreeQ [{a, b, c, d, e, f}, x] && NeQ[b*c - a*d, 0] && NeQ[a^2 - b^2, 0] && GtQ[m, 0] && IntegerQ[2*m]
Int[((a_) + (b_.)*sin[(e_.) + (f_.)*(x_)])^(m_.)*((A_.) + (C_.)*sin[(e_.) + (f_.)*(x_)]^2), x_Symbol] :> Simp[C/b^2 Int[(a + b*Sin[e + f*x])^(m + 1) *Simp[-a + b*Sin[e + f*x], x], x], x] /; FreeQ[{a, b, e, f, A, C, m}, x] && EqQ[A*b^2 + a^2*C, 0]
Time = 3.12 (sec) , antiderivative size = 74, normalized size of antiderivative = 0.80
method | result | size |
parallelrisch | \(\frac {12 a^{3} d x -6 a \,b^{2} d x -b^{3} \sin \left (3 d x +3 c \right )-3 a \,b^{2} \sin \left (2 d x +2 c \right )+12 \sin \left (d x +c \right ) a^{2} b -9 b^{3} \sin \left (d x +c \right )}{12 d}\) | \(74\) |
derivativedivides | \(\frac {-\frac {b^{3} \left (2+\cos ^{2}\left (d x +c \right )\right ) \sin \left (d x +c \right )}{3}-a \,b^{2} \left (\frac {\cos \left (d x +c \right ) \sin \left (d x +c \right )}{2}+\frac {d x}{2}+\frac {c}{2}\right )+\sin \left (d x +c \right ) a^{2} b +a^{3} \left (d x +c \right )}{d}\) | \(75\) |
default | \(\frac {-\frac {b^{3} \left (2+\cos ^{2}\left (d x +c \right )\right ) \sin \left (d x +c \right )}{3}-a \,b^{2} \left (\frac {\cos \left (d x +c \right ) \sin \left (d x +c \right )}{2}+\frac {d x}{2}+\frac {c}{2}\right )+\sin \left (d x +c \right ) a^{2} b +a^{3} \left (d x +c \right )}{d}\) | \(75\) |
parts | \(a^{3} x +\frac {\sin \left (d x +c \right ) a^{2} b}{d}-\frac {b^{3} \left (2+\cos ^{2}\left (d x +c \right )\right ) \sin \left (d x +c \right )}{3 d}-\frac {a \,b^{2} \left (\frac {\cos \left (d x +c \right ) \sin \left (d x +c \right )}{2}+\frac {d x}{2}+\frac {c}{2}\right )}{d}\) | \(76\) |
risch | \(a^{3} x -\frac {a \,b^{2} x}{2}+\frac {\sin \left (d x +c \right ) a^{2} b}{d}-\frac {3 \sin \left (d x +c \right ) b^{3}}{4 d}-\frac {b^{3} \sin \left (3 d x +3 c \right )}{12 d}-\frac {a \,b^{2} \sin \left (2 d x +2 c \right )}{4 d}\) | \(77\) |
norman | \(\frac {\left (a^{3}-\frac {1}{2} a \,b^{2}\right ) x +\left (a^{3}-\frac {1}{2} a \,b^{2}\right ) x \left (\tan ^{6}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )+\left (3 a^{3}-\frac {3}{2} a \,b^{2}\right ) x \left (\tan ^{2}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )+\left (3 a^{3}-\frac {3}{2} a \,b^{2}\right ) x \left (\tan ^{4}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )+\frac {b \left (2 a^{2}-a b -2 b^{2}\right ) \tan \left (\frac {d x}{2}+\frac {c}{2}\right )}{d}+\frac {b \left (2 a^{2}+a b -2 b^{2}\right ) \left (\tan ^{5}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{d}+\frac {4 b \left (3 a^{2}-b^{2}\right ) \left (\tan ^{3}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{3 d}}{\left (1+\tan ^{2}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )^{3}}\) | \(190\) |
1/12*(12*a^3*d*x-6*a*b^2*d*x-b^3*sin(3*d*x+3*c)-3*a*b^2*sin(2*d*x+2*c)+12* sin(d*x+c)*a^2*b-9*b^3*sin(d*x+c))/d
Time = 0.28 (sec) , antiderivative size = 67, normalized size of antiderivative = 0.73 \[ \int (a+b \cos (c+d x)) \left (a^2-b^2 \cos ^2(c+d x)\right ) \, dx=\frac {3 \, {\left (2 \, a^{3} - a b^{2}\right )} d x - {\left (2 \, b^{3} \cos \left (d x + c\right )^{2} + 3 \, a b^{2} \cos \left (d x + c\right ) - 6 \, a^{2} b + 4 \, b^{3}\right )} \sin \left (d x + c\right )}{6 \, d} \]
1/6*(3*(2*a^3 - a*b^2)*d*x - (2*b^3*cos(d*x + c)^2 + 3*a*b^2*cos(d*x + c) - 6*a^2*b + 4*b^3)*sin(d*x + c))/d
Time = 0.13 (sec) , antiderivative size = 131, normalized size of antiderivative = 1.42 \[ \int (a+b \cos (c+d x)) \left (a^2-b^2 \cos ^2(c+d x)\right ) \, dx=\begin {cases} a^{3} x + \frac {a^{2} b \sin {\left (c + d x \right )}}{d} - \frac {a b^{2} x \sin ^{2}{\left (c + d x \right )}}{2} - \frac {a b^{2} x \cos ^{2}{\left (c + d x \right )}}{2} - \frac {a b^{2} \sin {\left (c + d x \right )} \cos {\left (c + d x \right )}}{2 d} - \frac {2 b^{3} \sin ^{3}{\left (c + d x \right )}}{3 d} - \frac {b^{3} \sin {\left (c + d x \right )} \cos ^{2}{\left (c + d x \right )}}{d} & \text {for}\: d \neq 0 \\x \left (a + b \cos {\left (c \right )}\right ) \left (a^{2} - b^{2} \cos ^{2}{\left (c \right )}\right ) & \text {otherwise} \end {cases} \]
Piecewise((a**3*x + a**2*b*sin(c + d*x)/d - a*b**2*x*sin(c + d*x)**2/2 - a *b**2*x*cos(c + d*x)**2/2 - a*b**2*sin(c + d*x)*cos(c + d*x)/(2*d) - 2*b** 3*sin(c + d*x)**3/(3*d) - b**3*sin(c + d*x)*cos(c + d*x)**2/d, Ne(d, 0)), (x*(a + b*cos(c))*(a**2 - b**2*cos(c)**2), True))
Time = 0.20 (sec) , antiderivative size = 73, normalized size of antiderivative = 0.79 \[ \int (a+b \cos (c+d x)) \left (a^2-b^2 \cos ^2(c+d x)\right ) \, dx=\frac {12 \, {\left (d x + c\right )} a^{3} - 3 \, {\left (2 \, d x + 2 \, c + \sin \left (2 \, d x + 2 \, c\right )\right )} a b^{2} + 4 \, {\left (\sin \left (d x + c\right )^{3} - 3 \, \sin \left (d x + c\right )\right )} b^{3} + 12 \, a^{2} b \sin \left (d x + c\right )}{12 \, d} \]
1/12*(12*(d*x + c)*a^3 - 3*(2*d*x + 2*c + sin(2*d*x + 2*c))*a*b^2 + 4*(sin (d*x + c)^3 - 3*sin(d*x + c))*b^3 + 12*a^2*b*sin(d*x + c))/d
Time = 0.29 (sec) , antiderivative size = 74, normalized size of antiderivative = 0.80 \[ \int (a+b \cos (c+d x)) \left (a^2-b^2 \cos ^2(c+d x)\right ) \, dx=-\frac {b^{3} \sin \left (3 \, d x + 3 \, c\right )}{12 \, d} - \frac {a b^{2} \sin \left (2 \, d x + 2 \, c\right )}{4 \, d} + \frac {1}{2} \, {\left (2 \, a^{3} - a b^{2}\right )} x + \frac {{\left (4 \, a^{2} b - 3 \, b^{3}\right )} \sin \left (d x + c\right )}{4 \, d} \]
-1/12*b^3*sin(3*d*x + 3*c)/d - 1/4*a*b^2*sin(2*d*x + 2*c)/d + 1/2*(2*a^3 - a*b^2)*x + 1/4*(4*a^2*b - 3*b^3)*sin(d*x + c)/d
Time = 1.62 (sec) , antiderivative size = 76, normalized size of antiderivative = 0.83 \[ \int (a+b \cos (c+d x)) \left (a^2-b^2 \cos ^2(c+d x)\right ) \, dx=a^3\,x-\frac {3\,b^3\,\sin \left (c+d\,x\right )}{4\,d}-\frac {b^3\,\sin \left (3\,c+3\,d\,x\right )}{12\,d}-\frac {a\,b^2\,x}{2}-\frac {a\,b^2\,\sin \left (2\,c+2\,d\,x\right )}{4\,d}+\frac {a^2\,b\,\sin \left (c+d\,x\right )}{d} \]